{template 'common/header'}
<ul class="nav nav-tabs">
	<li {if $operation == 'display'}class="active"{/if}><a href="{php echo $this->createWebUrl('merchant', array('op' => 'display'))}">商家列表</a></li>
	<li {if $operation == 'edit'}class="active"{/if}><a href="{php echo $this->createWebUrl('merchant', array('op' => 'edit',array('id'=>$id)))}">编辑商家</a></li>
</ul>
<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1">
		<div class="panel panel-default">
			<div class="panel-heading">编辑商家</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">商家名称</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="name" class="form-control" value="{$merchant['name']}" />
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">商家Logo</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('avatar', $merchant['avatar'], '', array('extras' => array('text' => 'readonly')))}
						<span class="help-block" style="color:red;">推荐尺寸200*200</span>
					</div>
				</div>
				
				<div class="form-group has-warning">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">绑定Openid</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="openid" class="form-control" value="{$merchant['openid']}" />
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">联系手机</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="telphone" class="form-control" value="{$merchant['telphone']}" />
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">姓名</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="realname" class="form-control" value="{$merchant['realname']}" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">身份证</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="idcard" class="form-control" value="{$merchant['idcard']}" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">商家地址</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="address" id="address" class="form-control" value="{$merchant['address']}" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
					<div class="col-sm-9 col-xs-12">
						<label for="status1" class="radio-inline"><input name="status" value="1" id="status1" {if $merchant['status'] == 1}checked="true"{/if} type="radio"> 已审核</label>
						&nbsp;&nbsp;&nbsp;
						<label for="status2" class="radio-inline"><input name="status" value="0" id="status2" {if $merchant['status'] == 0}checked="true"{/if} type="radio"> 等待审核</label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">启用单独提现费率</label>
					<div class="col-sm-9 col-xs-12">
						<label for="usetx1" class="radio-inline"><input name="usetx" value="1" id="usetx1" {if $merchant['usetx'] == 1}checked="true"{/if} type="radio"> 启用</label>
						&nbsp;&nbsp;&nbsp;
						<label for="usetx2" class="radio-inline"><input name="usetx" value="0" id="usetx2" {if $merchant['usetx'] == 0}checked="true"{/if} type="radio"> 不启用</label>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">提现费率</label>
					<div class="col-sm-4 col-xs-12">
						<div class="input-group">
							<input class="form-control" name="txdisaccount" value="{$merchant['txdisaccount']}" type="text">
							<span class="input-group-addon">%</span>
						</div>
						<span class="help-block"><strong style="color:red;">每次提现扣除的服务费（%），进入平台账户。例：填写1.00，即为1%</strong></span>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否团长</label>
					<div class="col-sm-9 col-xs-12">
						<label for="istz1" class="radio-inline"><input name="istz" value="1" id="istz1" {if $merchant['istz'] == 1}checked="true"{/if} type="radio"> 是</label>
						&nbsp;&nbsp;&nbsp;
						<label for="istz2" class="radio-inline"><input name="istz" value="0" id="istz2" {if $merchant['istz'] == 0}checked="true"{/if} type="radio"> 否</label>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">成为团长类型</label>
					<div class="col-sm-9 col-xs-12">
						<label for="tzintype1" class="radio-inline"><input name="tzintype" value="0" id="tzintype1" {if $merchant['tzintype'] == 0}checked="true"{/if} type="radio"> 后台手动加入（或0元免费成为）</label>
						&nbsp;&nbsp;&nbsp;
						<label for="tzintype2" class="radio-inline"><input name="tzintype" value="1" id="tzintype2" {if $merchant['tzintype'] == 1}checked="true"{/if} type="radio"> 付费加入</label>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">团长微信二维码</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image('wxqrcode', $merchant['wxqrcode'], '', array('extras' => array('text' => 'readonly')))}
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">团长加入时间</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_date('tztime',date('Y-m-d H:i:s',$merchant['tztime']),true);}
						<span class="help-block" style="color:red;">团长加入时间用于结算活动的团队奖励</span>
					</div>
				</div>	
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="op" value="edit" />
			<input type="hidden" name="dododo" value="1" />
			<input type="hidden" name="id" value="{$merchant['id']}" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</form>
</div>
<script>
</script>
{template 'common/footer'}